﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DTO;
using DAO;
namespace BUS
{
    public class DonViTinhBUS
    {
        // ---------------- LOI -----------------
        public List<DonViTinhDTO> LayDanhSachDonViTinhL()
        {
            DonViTinhDAO dvDAO = new DonViTinhDAO();
            return dvDAO.LayDanhSachDonViTinhL();
        }
        public string LayTenDonViTinhL(int maDV)
        {
            DonViTinhDAO dvDAO = new DonViTinhDAO();
            return dvDAO.LayTenDonViTinhL(maDV);
        }
        public int LayMaDonViTinhL(string ten)
        {
            DonViTinhDAO dvDAO = new DonViTinhDAO();
            return dvDAO.LayMaDonViTinhL(ten);
        }
        //EDN ------------------LOI ---------------
        //------------------KIM----------------
        public List<DonViTinhDTO> KLayDSDVT()
        {
            DonViTinhDAO dao = new DonViTinhDAO();

            return dao.KLayDSDVT();
        }
        public int KLayMaDonViTinh(string ten)
        {
            DonViTinhDAO dvDAO = new DonViTinhDAO();
            return dvDAO.KLayMaDonViTinh(ten);
        }
        //END--------------KIM--------------
        //-------------------HAI---------------
        public List<DonViTinhDTO> LayDSDVT()
        {
            DonViTinhDAO dao = new DonViTinhDAO();

            return dao.LayDSDVT();
        }
        public List<DonViTinhDTO> LayDanhSachDonViTinh()
        {
            DonViTinhDAO dvDAO = new DonViTinhDAO();
            return dvDAO.LayDanhSachDonViTinh();
        }
        public string LayTenDonViTinh(int maDV)
        {
            DonViTinhDAO dvDAO = new DonViTinhDAO();
            return dvDAO.LayTenDonViTinh(maDV);
        }
        public int LayMaDonViTinh(string ten)
        {
            DonViTinhDAO dvDAO = new DonViTinhDAO();
            return dvDAO.LayMaDonViTinh(ten);
        }
        //-----------------END HAI-------------
    }
}
